home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Games Machine 76
/
XENIATGM66.iso
/
Indiana Jones
/
Indiana Jones.exe
/
RESOURCE
/
PREVIEW.GOB
/
cog_vol_sharkcaveamb.cog
< prev
next >
Wrap
Text File
|
1999-11-15
|
4KB
|
155 lines
# Jones 3D Cog Script
#
# VOL_RoomAmb.cog
#
# Produces random ambient cave sounds when crossing adjoins
# Based on code from TEO_Drops.cog by SXC.
#
# [TRM & SXC] modified 12/3 by [CMG]
#
# (C) 1998 LucasArts Entertainment Co. All Rights Reserved
# ========================================================================================
symbols
#................MESSAGES........................
message startup
message crossed
message pulse
#................ACTORS..........................
thing player local
#................TRIGGERS........................
surface oncross linkID=2
surface oncross1 linkID=2
surface oncross2 linkID=2
surface oncross3 linkID=2
surface oncross4 linkID=2
surface oncross5 linkID=2
surface offcross linkID=3
surface offcross1 linkID=3
surface offcross2 linkID=3
surface offcross3 linkID=3
surface offcross4 linkID=3
surface offcross5 linkID=3
#................SOUNDS........................
sound sndCave0=olv_outside_a05.wav local
sound sndCave1=lag_inside_a06.wav local
sound sndCave2=gen_amb_eerie_02.wav local
sound sndCave3=gen_cave_a2.wav local
sound sndCave4=nub_ambient1_a.wav local
sound sndCave5=gen_cave_a5.wav local
sound sndCave6=lag_inside_a01.wav local
sound sndCave7=lag_inside_a04.wav local
sound sndCave8=olv_outside_a03.wav local
#................VARIABLES........................
float caveFreq local
flex pulseTime local
flex vol=1.0 local
end
# ========================================================================================
code
startup:
player = GetLocalPlayerThing();
return;
# ========================================================================================
crossed:
If ((GetSenderID() == 2) && (GetSourceref() == player))
{
pulseTime=RandBetween(4, 12);
SetPulse(pulseTime);
}
If ((GetSenderID() == 3) && (GetSourceref() == player))
{
SetPulse(0);
}
return;
# ========================================================================================
pulse:
pulseTime=RandBetween(4, 8);
SetPulse(pulseTime);
# check if indy is swimming, if so set the pluse then drop out
if (GetMoveStatus(player) == 12) return;
caveFreq = Rand();
if (caveFreq < 0.16)
{
PlaySoundLocal(sndCave0, vol, 1, 0, 0);
}
if ((caveFreq > 0.16) && (caveFreq < 0.24))
{
PlaySoundLocal(sndCave1, vol, 1, 0, 0);
}
if ((caveFreq > 0.24) && (caveFreq < 0.36))
{
PlaySoundLocal(sndCave2, vol, -1, 0, 0);
}
if ((caveFreq > 0.36) && (caveFreq < 0.48))
{
PlaySoundLocal(sndCave3, vol, 1, 0, 0);
}
if ((caveFreq > 0.48) && (caveFreq < 0.56))
{
PlaySoundLocal(sndCave4, vol, 0, 0, 0);
}
if ((caveFreq > 0.56) && (caveFreq < 0.64))
{
PlaySoundLocal(sndCave5, vol, -1, 0, 0);
}
if ((caveFreq > 0.64) && (caveFreq < 0.72))
{
PlaySoundLocal(sndCave6, vol, -1, 0, 0);
}
if ((caveFreq > 0.72) && (caveFreq < 0.84))
{
PlaySoundLocal(sndCave7, vol, -1, 0, 0);
}
if ((caveFreq > 0.84) && (caveFreq < 1.0))
{
PlaySoundLocal(sndCave8, vol, -1, 0, 0);
}
return;
return;
# ========================================================================================
end